package com.xiaodimall.beforesys.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import java.io.Serializable;

import java.util.Date;


/**
* 用户表
* @TableName tb_user
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_user")
public class User implements Serializable {

    /**
    * 用户主键id
    */
    @TableId(type = IdType.AUTO)
    private Long userId;
    /**
    * 用户昵称
    */
    @TableField("nick_name")
    private String nickName;
    /**
    * 登陆名称(默认为手机号)
    */
    @TableField("login_name")
    private String loginName;
    /**
    * MD5加密后的密码
    */
    @TableField("password_md5")
    private String passwordMd5;
    /**
    * Eamil
    */
    private String email;
    /**
    * 个性签名
    */
    @TableField("introduce_sign")
    private String introduceSign;
    /**
    * 收货地址
    */
    private String address;
    /**
    * 注销标识字段(0-正常 1-已注销)
    */
    @TableField("is_deleted")
    private Integer isDeleted;
    /**
    * 锁定标识字段(0-未锁定 1-已锁定)
    */
    @TableField("locked_flag")
    private Integer lockedFlag;
    /**
    * 注册时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;


    @TableField(exist = false)
    private int shopCartItemCount;

}
